{
  "properties" : { },
  "id" : "803486d3a09e4168a5e51eb783bce423",
  "script" : null,
  "groupId" : "b3703296495946aabf6a72b7d085c5d6",
  "name" : "删除文件",
  "createTime" : null,
  "updateTime" : 1739539952534,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "del_file",
  "method" : "GET",
  "parameters" : [ {
    "name" : "search",
    "value" : "仙逆",
    "description" : null,
    "required" : true,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": [\n        {\n            \"id\": 954,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第10集.mp4\",\n            \"name\": \"第10集.mp4\",\n            \"size\": \"666\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 955,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第11集.mp4\",\n            \"name\": \"第11集.mp4\",\n            \"size\": \"513\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 956,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第12集.mp4\",\n            \"name\": \"第12集.mp4\",\n            \"size\": \"614\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 957,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第13集.mp4\",\n            \"name\": \"第13集.mp4\",\n            \"size\": \"577\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 958,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第14集.mp4\",\n            \"name\": \"第14集.mp4\",\n            \"size\": \"534\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 959,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第15集.mp4\",\n            \"name\": \"第15集.mp4\",\n            \"size\": \"593\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 960,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第16集.mp4\",\n            \"name\": \"第16集.mp4\",\n            \"size\": \"555\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 961,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第17集.mp4\",\n            \"name\": \"第17集.mp4\",\n            \"size\": \"629\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 962,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第18集.mp4\",\n            \"name\": \"第18集.mp4\",\n            \"size\": \"603\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 963,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第19集.mp4\",\n            \"name\": \"第19集.mp4\",\n            \"size\": \"576\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 965,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第20集.mp4\",\n            \"name\": \"第20集.mp4\",\n            \"size\": \"386\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 966,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第21集.mp4\",\n            \"name\": \"第21集.mp4\",\n            \"size\": \"370\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 967,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第22集.mp4\",\n            \"name\": \"第22集.mp4\",\n            \"size\": \"402\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 968,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第23集.mp4\",\n            \"name\": \"第23集.mp4\",\n            \"size\": \"427\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 969,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第24集.mp4\",\n            \"name\": \"第24集.mp4\",\n            \"size\": \"414\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 970,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第25集.mp4\",\n            \"name\": \"第25集.mp4\",\n            \"size\": \"379\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 971,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第26集.mp4\",\n            \"name\": \"第26集.mp4\",\n            \"size\": \"365\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 972,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第27集.mp4\",\n            \"name\": \"第27集.mp4\",\n            \"size\": \"374\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 973,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第28集.mp4\",\n            \"name\": \"第28集.mp4\",\n            \"size\": \"375\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 974,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第29集.mp4\",\n            \"name\": \"第29集.mp4\",\n            \"size\": \"459\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 975,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第2集.mp4\",\n            \"name\": \"第2集.mp4\",\n            \"size\": \"668\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 976,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第30集.mp4\",\n            \"name\": \"第30集.mp4\",\n            \"size\": \"380\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 977,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第31集.mp4\",\n            \"name\": \"第31集.mp4\",\n            \"size\": \"447\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 978,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第32集.mp4\",\n            \"name\": \"第32集.mp4\",\n            \"size\": \"406\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 979,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第33集.mp4\",\n            \"name\": \"第33集.mp4\",\n            \"size\": \"337\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 980,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第34集.mp4\",\n            \"name\": \"第34集.mp4\",\n            \"size\": \"437\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 981,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第35集.mp4\",\n            \"name\": \"第35集.mp4\",\n            \"size\": \"353\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 982,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第36集.mp4\",\n            \"name\": \"第36集.mp4\",\n            \"size\": \"548\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 983,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第37集.mp4\",\n            \"name\": \"第37集.mp4\",\n            \"size\": \"323\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 984,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第38集.mp4\",\n            \"name\": \"第38集.mp4\",\n            \"size\": \"426\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 985,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第39集.mp4\",\n            \"name\": \"第39集.mp4\",\n            \"size\": \"335\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 986,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第3集.mp4\",\n            \"name\": \"第3集.mp4\",\n            \"size\": \"714\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 987,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第4集.mp4\",\n            \"name\": \"第4集.mp4\",\n            \"size\": \"517\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 988,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第5集.mp4\",\n            \"name\": \"第5集.mp4\",\n            \"size\": \"585\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 989,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第6集.mp4\",\n            \"name\": \"第6集.mp4\",\n            \"size\": \"483\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 990,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第7集.mp4\",\n            \"name\": \"第7集.mp4\",\n            \"size\": \"702\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 991,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第8集.mp4\",\n            \"name\": \"第8集.mp4\",\n            \"size\": \"624\",\n            \"fps\": \"25\"\n        },\n        {\n            \"id\": 992,\n            \"path\": \"E:\\\\video\\\\网络下载\\\\国漫-仙逆\\\\第9集.mp4\",\n            \"name\": \"第9集.mp4\",\n            \"size\": \"566\",\n            \"fps\": \"25\"\n        }\n    ]\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import java.io.BufferedReader;
import java.io.InputStreamReader;
import log;

var datalist = db.table('file_videos').where().like('path','%'+search+'%').select();
for (item in datalist) {
    log.info(cmd);
    // cmd 删除
    String cmd = "cmd /c del /f \""+item.path+"\"";
    Process process = Runtime.getRuntime().exec(cmd);
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
    process.waitFor();
    // data 删除
    db.table('file_videos').where().eq('id', item.id).delete();
}

return 1